Integrand size = 18, antiderivative size = 68 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {a (c+d x)^3}{3 d}+\frac {2 b d^2 \cos (e+f x)}{f^3}-\frac {b (c+d x)^2 \cos (e+f x)}{f}+\frac {2 b d (c+d x) \sin (e+f x)}{f^2} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3398, 3377, 2718} \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {a (c+d x)^3}{3 d}+\frac {2 b d (c+d x) \sin (e+f x)}{f^2}-\frac {b (c+d x)^2 \cos (e+f x)}{f}+\frac {2 b d^2 \cos (e+f x)}{f^3} \]
[In]
[Out]
Rule 2718
Rule 3377
Rule 3398
Rubi steps \begin{align*} \text {integral}& = \int \left (a (c+d x)^2+b (c+d x)^2 \sin (e+f x)\right ) \, dx \\ & = \frac {a (c+d x)^3}{3 d}+b \int (c+d x)^2 \sin (e+f x) \, dx \\ & = \frac {a (c+d x)^3}{3 d}-\frac {b (c+d x)^2 \cos (e+f x)}{f}+\frac {(2 b d) \int (c+d x) \cos (e+f x) \, dx}{f} \\ & = \frac {a (c+d x)^3}{3 d}-\frac {b (c+d x)^2 \cos (e+f x)}{f}+\frac {2 b d (c+d x) \sin (e+f x)}{f^2}-\frac {\left (2 b d^2\right ) \int \sin (e+f x) \, dx}{f^2} \\ & = \frac {a (c+d x)^3}{3 d}+\frac {2 b d^2 \cos (e+f x)}{f^3}-\frac {b (c+d x)^2 \cos (e+f x)}{f}+\frac {2 b d (c+d x) \sin (e+f x)}{f^2} \\ \end{align*}
Time = 0.22 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.24 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {1}{3} a x \left (3 c^2+3 c d x+d^2 x^2\right )-\frac {b \left (c^2 f^2+2 c d f^2 x+d^2 \left (-2+f^2 x^2\right )\right ) \cos (e+f x)}{f^3}+\frac {2 b d (c+d x) \sin (e+f x)}{f^2} \]
[In]
[Out]
Time = 0.19 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.25
method | result | size |
parallelrisch | \(\frac {-\left (\left (d x +c \right )^{2} f^{2}-2 d^{2}\right ) b \cos \left (f x +e \right )+2 b d f \left (d x +c \right ) \sin \left (f x +e \right )+x a \left (\frac {1}{3} d^{2} x^{2}+c d x +c^{2}\right ) f^{3}-b \,c^{2} f^{2}+2 b \,d^{2}}{f^{3}}\) | \(85\) |
risch | \(\frac {a \,d^{2} x^{3}}{3}+a d c \,x^{2}+a \,c^{2} x +\frac {a \,c^{3}}{3 d}-\frac {b \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2}\right ) \cos \left (f x +e \right )}{f^{3}}+\frac {2 b d \left (d x +c \right ) \sin \left (f x +e \right )}{f^{2}}\) | \(94\) |
parts | \(\frac {a \left (d x +c \right )^{3}}{3 d}+\frac {b \left (\frac {d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}+\frac {2 c d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {2 d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}-c^{2} \cos \left (f x +e \right )+\frac {2 c d e \cos \left (f x +e \right )}{f}-\frac {d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}\right )}{f}\) | \(163\) |
norman | \(\frac {\frac {\left (2 b \,c^{2} f^{2}-4 b \,d^{2}\right ) \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f^{3}}+\frac {c \left (a c f -2 b d \right ) x}{f}+\frac {d \left (a c f -b d \right ) x^{2}}{f}+\frac {c \left (a c f +2 b d \right ) x \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {d \left (a c f +b d \right ) x^{2} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{f}+\frac {a \,d^{2} x^{3}}{3}+\frac {a \,d^{2} x^{3} \left (\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{3}+\frac {4 b \,d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {4 c d b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}}{1+\tan ^{2}\left (\frac {f x}{2}+\frac {e}{2}\right )}\) | \(199\) |
derivativedivides | \(\frac {a \,c^{2} \left (f x +e \right )-\frac {2 a c d e \left (f x +e \right )}{f}+\frac {a c d \left (f x +e \right )^{2}}{f}+\frac {a \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {a \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a \,d^{2} \left (f x +e \right )^{3}}{3 f^{2}}-c^{2} b \cos \left (f x +e \right )+\frac {2 b c d e \cos \left (f x +e \right )}{f}+\frac {2 b c d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {b \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {2 b \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {b \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}}{f}\) | \(241\) |
default | \(\frac {a \,c^{2} \left (f x +e \right )-\frac {2 a c d e \left (f x +e \right )}{f}+\frac {a c d \left (f x +e \right )^{2}}{f}+\frac {a \,d^{2} e^{2} \left (f x +e \right )}{f^{2}}-\frac {a \,d^{2} e \left (f x +e \right )^{2}}{f^{2}}+\frac {a \,d^{2} \left (f x +e \right )^{3}}{3 f^{2}}-c^{2} b \cos \left (f x +e \right )+\frac {2 b c d e \cos \left (f x +e \right )}{f}+\frac {2 b c d \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f}-\frac {b \,d^{2} e^{2} \cos \left (f x +e \right )}{f^{2}}-\frac {2 b \,d^{2} e \left (\sin \left (f x +e \right )-\left (f x +e \right ) \cos \left (f x +e \right )\right )}{f^{2}}+\frac {b \,d^{2} \left (-\left (f x +e \right )^{2} \cos \left (f x +e \right )+2 \cos \left (f x +e \right )+2 \left (f x +e \right ) \sin \left (f x +e \right )\right )}{f^{2}}}{f}\) | \(241\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.50 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {a d^{2} f^{3} x^{3} + 3 \, a c d f^{3} x^{2} + 3 \, a c^{2} f^{3} x - 3 \, {\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} - 2 \, b d^{2}\right )} \cos \left (f x + e\right ) + 6 \, {\left (b d^{2} f x + b c d f\right )} \sin \left (f x + e\right )}{3 \, f^{3}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 151 vs. \(2 (65) = 130\).
Time = 0.23 (sec) , antiderivative size = 151, normalized size of antiderivative = 2.22 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\begin {cases} a c^{2} x + a c d x^{2} + \frac {a d^{2} x^{3}}{3} - \frac {b c^{2} \cos {\left (e + f x \right )}}{f} - \frac {2 b c d x \cos {\left (e + f x \right )}}{f} + \frac {2 b c d \sin {\left (e + f x \right )}}{f^{2}} - \frac {b d^{2} x^{2} \cos {\left (e + f x \right )}}{f} + \frac {2 b d^{2} x \sin {\left (e + f x \right )}}{f^{2}} + \frac {2 b d^{2} \cos {\left (e + f x \right )}}{f^{3}} & \text {for}\: f \neq 0 \\\left (a + b \sin {\left (e \right )}\right ) \left (c^{2} x + c d x^{2} + \frac {d^{2} x^{3}}{3}\right ) & \text {otherwise} \end {cases} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 239 vs. \(2 (66) = 132\).
Time = 0.21 (sec) , antiderivative size = 239, normalized size of antiderivative = 3.51 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {3 \, {\left (f x + e\right )} a c^{2} + \frac {{\left (f x + e\right )}^{3} a d^{2}}{f^{2}} - \frac {3 \, {\left (f x + e\right )}^{2} a d^{2} e}{f^{2}} + \frac {3 \, {\left (f x + e\right )} a d^{2} e^{2}}{f^{2}} + \frac {3 \, {\left (f x + e\right )}^{2} a c d}{f} - \frac {6 \, {\left (f x + e\right )} a c d e}{f} - 3 \, b c^{2} \cos \left (f x + e\right ) - \frac {3 \, b d^{2} e^{2} \cos \left (f x + e\right )}{f^{2}} + \frac {6 \, b c d e \cos \left (f x + e\right )}{f} + \frac {6 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b d^{2} e}{f^{2}} - \frac {6 \, {\left ({\left (f x + e\right )} \cos \left (f x + e\right ) - \sin \left (f x + e\right )\right )} b c d}{f} - \frac {3 \, {\left ({\left ({\left (f x + e\right )}^{2} - 2\right )} \cos \left (f x + e\right ) - 2 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} b d^{2}}{f^{2}}}{3 \, f} \]
[In]
[Out]
none
Time = 0.34 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.37 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {1}{3} \, a d^{2} x^{3} + a c d x^{2} + a c^{2} x - \frac {{\left (b d^{2} f^{2} x^{2} + 2 \, b c d f^{2} x + b c^{2} f^{2} - 2 \, b d^{2}\right )} \cos \left (f x + e\right )}{f^{3}} + \frac {2 \, {\left (b d^{2} f x + b c d f\right )} \sin \left (f x + e\right )}{f^{3}} \]
[In]
[Out]
Time = 0.45 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.65 \[ \int (c+d x)^2 (a+b \sin (e+f x)) \, dx=\frac {a\,d^2\,x^3}{3}+\frac {\cos \left (e+f\,x\right )\,\left (2\,b\,d^2-b\,c^2\,f^2\right )}{f^3}+a\,c^2\,x+a\,c\,d\,x^2+\frac {2\,b\,d^2\,x\,\sin \left (e+f\,x\right )}{f^2}-\frac {b\,d^2\,x^2\,\cos \left (e+f\,x\right )}{f}+\frac {2\,b\,c\,d\,\sin \left (e+f\,x\right )}{f^2}-\frac {2\,b\,c\,d\,x\,\cos \left (e+f\,x\right )}{f} \]
[In]
[Out]